<?php

//post请求
function returnPost($url, $post){
	$options = array(
		CURLOPT_RETURNTRANSFER =>true,
		CURLOPT_HEADER =>false,
		CURLOPT_POST =>true,
		CURLOPT_POSTFIELDS => $post,
	);
	$ch = curl_init($url);
	curl_setopt_array($ch, $options);
	$result = curl_exec($ch);
	curl_close($ch);
	return $result;
}

//获取assess_token
function getToken($url , $appid , $secret ){
	$result = file_get_contents($url.'&appid='.$appid.'&secret='.$secret);
	$result = json_decode($result ,true);
	return $result;
}